\(\int (f+g x) (a+b \log (c (d+e x)^n))^3 \, dx\) [54]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 265 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\frac {6 a b^2 (e f-d g) n^2 x}{e}-\frac {6 b^3 (e f-d g) n^3 x}{e}-\frac {3 b^3 g n^3 (d+e x)^2}{8 e^2}+\frac {6 b^3 (e f-d g) n^2 (d+e x) \log \left (c (d+e x)^n\right )}{e^2}+\frac {3 b^2 g n^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {3 b (e f-d g) n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2}-\frac {3 b g n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{4 e^2}+\frac {(e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2} \]

[Out]

6*a*b^2*(-d*g+e*f)*n^2*x/e-6*b^3*(-d*g+e*f)*n^3*x/e-3/8*b^3*g*n^3*(e*x+d)^2/e^2+6*b^3*(-d*g+e*f)*n^2*(e*x+d)*l
n(c*(e*x+d)^n)/e^2+3/4*b^2*g*n^2*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))/e^2-3*b*(-d*g+e*f)*n*(e*x+d)*(a+b*ln(c*(e*x+d
)^n))^2/e^2-3/4*b*g*n*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))^2/e^2+(-d*g+e*f)*(e*x+d)*(a+b*ln(c*(e*x+d)^n))^3/e^2+1/2
*g*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))^3/e^2

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {2448, 2436, 2333, 2332, 2437, 2342, 2341} \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\frac {3 b^2 g n^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 e^2}+\frac {6 a b^2 n^2 x (e f-d g)}{e}-\frac {3 b n (d+e x) (e f-d g) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2}+\frac {(d+e x) (e f-d g) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}-\frac {3 b g n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{4 e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2}+\frac {6 b^3 n^2 (d+e x) (e f-d g) \log \left (c (d+e x)^n\right )}{e^2}-\frac {3 b^3 g n^3 (d+e x)^2}{8 e^2}-\frac {6 b^3 n^3 x (e f-d g)}{e} \]

[In]

Int[(f + g*x)*(a + b*Log[c*(d + e*x)^n])^3,x]

[Out]

(6*a*b^2*(e*f - d*g)*n^2*x)/e - (6*b^3*(e*f - d*g)*n^3*x)/e - (3*b^3*g*n^3*(d + e*x)^2)/(8*e^2) + (6*b^3*(e*f
- d*g)*n^2*(d + e*x)*Log[c*(d + e*x)^n])/e^2 + (3*b^2*g*n^2*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n]))/(4*e^2) -
(3*b*(e*f - d*g)*n*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/e^2 - (3*b*g*n*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n
])^2)/(4*e^2) + ((e*f - d*g)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^3)/e^2 + (g*(d + e*x)^2*(a + b*Log[c*(d + e*
x)^n])^3)/(2*e^2)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2448

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {(e f-d g) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e}+\frac {g (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e}\right ) \, dx \\ & = \frac {g \int (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx}{e}+\frac {(e f-d g) \int \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx}{e} \\ & = \frac {g \text {Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx,x,d+e x\right )}{e^2}+\frac {(e f-d g) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^3 \, dx,x,d+e x\right )}{e^2} \\ & = \frac {(e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2}-\frac {(3 b g n) \text {Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{2 e^2}-\frac {(3 b (e f-d g) n) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e^2} \\ & = -\frac {3 b (e f-d g) n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2}-\frac {3 b g n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{4 e^2}+\frac {(e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2}+\frac {\left (3 b^2 g n^2\right ) \text {Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{2 e^2}+\frac {\left (6 b^2 (e f-d g) n^2\right ) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e^2} \\ & = \frac {6 a b^2 (e f-d g) n^2 x}{e}-\frac {3 b^3 g n^3 (d+e x)^2}{8 e^2}+\frac {3 b^2 g n^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {3 b (e f-d g) n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2}-\frac {3 b g n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{4 e^2}+\frac {(e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2}+\frac {\left (6 b^3 (e f-d g) n^2\right ) \text {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e^2} \\ & = \frac {6 a b^2 (e f-d g) n^2 x}{e}-\frac {6 b^3 (e f-d g) n^3 x}{e}-\frac {3 b^3 g n^3 (d+e x)^2}{8 e^2}+\frac {6 b^3 (e f-d g) n^2 (d+e x) \log \left (c (d+e x)^n\right )}{e^2}+\frac {3 b^2 g n^2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {3 b (e f-d g) n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e^2}-\frac {3 b g n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{4 e^2}+\frac {(e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{e^2}+\frac {g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3}{2 e^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 201, normalized size of antiderivative = 0.76 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\frac {8 (e f-d g) (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3+4 g (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^3-24 b (e f-d g) n \left ((d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2-2 b n \left (e (a-b n) x+b (d+e x) \log \left (c (d+e x)^n\right )\right )\right )-3 b g n \left (2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2+b n \left (b e n x (2 d+e x)-2 (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )\right )\right )}{8 e^2} \]

[In]

Integrate[(f + g*x)*(a + b*Log[c*(d + e*x)^n])^3,x]

[Out]

(8*(e*f - d*g)*(d + e*x)*(a + b*Log[c*(d + e*x)^n])^3 + 4*g*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n])^3 - 24*b*(e
*f - d*g)*n*((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2 - 2*b*n*(e*(a - b*n)*x + b*(d + e*x)*Log[c*(d + e*x)^n]))
- 3*b*g*n*(2*(d + e*x)^2*(a + b*Log[c*(d + e*x)^n])^2 + b*n*(b*e*n*x*(2*d + e*x) - 2*(d + e*x)^2*(a + b*Log[c*
(d + e*x)^n]))))/(8*e^2)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(905\) vs. \(2(257)=514\).

Time = 1.74 (sec) , antiderivative size = 906, normalized size of antiderivative = 3.42

method result size
parallelrisch \(-\frac {-6 a \,b^{2} e^{2} g \,n^{2} x^{2}-42 b^{3} d e g \,n^{3} x +6 a^{2} b \,e^{2} g n \,x^{2}-48 a \,b^{2} e^{2} f \,n^{2} x +24 a^{2} b \,e^{2} f n x -48 b^{3} d e f \,n^{3}+3 b^{3} e^{2} g \,n^{3} x^{2}+48 b^{3} e^{2} f \,n^{3} x -36 a \,b^{2} d^{2} g \,n^{2}+36 a \,b^{2} d e g \,n^{2} x +12 a^{2} b \,d^{2} g n -4 a^{3} e^{2} g \,x^{2}-8 a^{3} e^{2} f x +8 a^{3} d e f +42 b^{3} d^{2} g \,n^{3}-96 \ln \left (e x +d \right ) b^{3} d e f \,n^{3}-60 \ln \left (e x +d \right ) a \,b^{2} d^{2} g \,n^{2}+12 \ln \left (e x +d \right ) a^{2} b \,d^{2} g n -4 x^{2} \ln \left (c \left (e x +d \right )^{n}\right )^{3} b^{3} e^{2} g -8 x \ln \left (c \left (e x +d \right )^{n}\right )^{3} b^{3} e^{2} f -8 \ln \left (c \left (e x +d \right )^{n}\right )^{3} b^{3} d e f -18 \ln \left (c \left (e x +d \right )^{n}\right )^{2} b^{3} d^{2} g n -36 \ln \left (c \left (e x +d \right )^{n}\right ) b^{3} d^{2} g \,n^{2}+12 \ln \left (c \left (e x +d \right )^{n}\right )^{2} a \,b^{2} d^{2} g +6 x^{2} \ln \left (c \left (e x +d \right )^{n}\right )^{2} b^{3} e^{2} g n -6 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b^{3} e^{2} g \,n^{2}-12 x^{2} \ln \left (c \left (e x +d \right )^{n}\right )^{2} a \,b^{2} e^{2} g +24 x \ln \left (c \left (e x +d \right )^{n}\right )^{2} b^{3} e^{2} f n -48 x \ln \left (c \left (e x +d \right )^{n}\right ) b^{3} e^{2} f \,n^{2}-12 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) a^{2} b \,e^{2} g -24 x \ln \left (c \left (e x +d \right )^{n}\right )^{2} a \,b^{2} e^{2} f +24 \ln \left (c \left (e x +d \right )^{n}\right )^{2} b^{3} d e f n +48 \ln \left (c \left (e x +d \right )^{n}\right ) b^{3} d e f \,n^{2}-24 x \ln \left (c \left (e x +d \right )^{n}\right ) a^{2} b \,e^{2} f -24 \ln \left (c \left (e x +d \right )^{n}\right )^{2} a \,b^{2} d e f +24 \ln \left (c \left (e x +d \right )^{n}\right ) a \,b^{2} d^{2} g n +24 \ln \left (c \left (e x +d \right )^{n}\right ) a^{2} b d e f +48 a \,b^{2} d e f \,n^{2}-24 a^{2} b d e f n +78 \ln \left (e x +d \right ) b^{3} d^{2} g \,n^{3}-12 a^{2} b d e g n x +4 \ln \left (c \left (e x +d \right )^{n}\right )^{3} b^{3} d^{2} g +12 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) a \,b^{2} e^{2} g n -12 x \ln \left (c \left (e x +d \right )^{n}\right )^{2} b^{3} d e g n +36 x \ln \left (c \left (e x +d \right )^{n}\right ) b^{3} d e g \,n^{2}+96 \ln \left (e x +d \right ) a \,b^{2} d e f \,n^{2}-48 \ln \left (e x +d \right ) a^{2} b d e f n +48 x \ln \left (c \left (e x +d \right )^{n}\right ) a \,b^{2} e^{2} f n -48 \ln \left (c \left (e x +d \right )^{n}\right ) a \,b^{2} d e f n -24 x \ln \left (c \left (e x +d \right )^{n}\right ) a \,b^{2} d e g n}{8 e^{2}}\) \(906\)
risch \(\text {Expression too large to display}\) \(11547\)

[In]

int((g*x+f)*(a+b*ln(c*(e*x+d)^n))^3,x,method=_RETURNVERBOSE)

[Out]

-1/8*(-6*a*b^2*e^2*g*n^2*x^2-42*b^3*d*e*g*n^3*x+6*a^2*b*e^2*g*n*x^2-48*a*b^2*e^2*f*n^2*x+24*a^2*b*e^2*f*n*x-48
*b^3*d*e*f*n^3+3*b^3*e^2*g*n^3*x^2+48*b^3*e^2*f*n^3*x-36*a*b^2*d^2*g*n^2+36*a*b^2*d*e*g*n^2*x+12*a^2*b*d^2*g*n
-4*a^3*e^2*g*x^2-8*a^3*e^2*f*x+8*a^3*d*e*f+42*b^3*d^2*g*n^3-96*ln(e*x+d)*b^3*d*e*f*n^3-60*ln(e*x+d)*a*b^2*d^2*
g*n^2+12*ln(e*x+d)*a^2*b*d^2*g*n-4*x^2*ln(c*(e*x+d)^n)^3*b^3*e^2*g-8*x*ln(c*(e*x+d)^n)^3*b^3*e^2*f-8*ln(c*(e*x
+d)^n)^3*b^3*d*e*f-18*ln(c*(e*x+d)^n)^2*b^3*d^2*g*n-36*ln(c*(e*x+d)^n)*b^3*d^2*g*n^2+12*ln(c*(e*x+d)^n)^2*a*b^
2*d^2*g+6*x^2*ln(c*(e*x+d)^n)^2*b^3*e^2*g*n-6*x^2*ln(c*(e*x+d)^n)*b^3*e^2*g*n^2-12*x^2*ln(c*(e*x+d)^n)^2*a*b^2
*e^2*g+24*x*ln(c*(e*x+d)^n)^2*b^3*e^2*f*n-48*x*ln(c*(e*x+d)^n)*b^3*e^2*f*n^2-12*x^2*ln(c*(e*x+d)^n)*a^2*b*e^2*
g-24*x*ln(c*(e*x+d)^n)^2*a*b^2*e^2*f+24*ln(c*(e*x+d)^n)^2*b^3*d*e*f*n+48*ln(c*(e*x+d)^n)*b^3*d*e*f*n^2-24*x*ln
(c*(e*x+d)^n)*a^2*b*e^2*f-24*ln(c*(e*x+d)^n)^2*a*b^2*d*e*f+24*ln(c*(e*x+d)^n)*a*b^2*d^2*g*n+24*ln(c*(e*x+d)^n)
*a^2*b*d*e*f+48*a*b^2*d*e*f*n^2-24*a^2*b*d*e*f*n+78*ln(e*x+d)*b^3*d^2*g*n^3-12*a^2*b*d*e*g*n*x+4*ln(c*(e*x+d)^
n)^3*b^3*d^2*g+12*x^2*ln(c*(e*x+d)^n)*a*b^2*e^2*g*n-12*x*ln(c*(e*x+d)^n)^2*b^3*d*e*g*n+36*x*ln(c*(e*x+d)^n)*b^
3*d*e*g*n^2+96*ln(e*x+d)*a*b^2*d*e*f*n^2-48*ln(e*x+d)*a^2*b*d*e*f*n+48*x*ln(c*(e*x+d)^n)*a*b^2*e^2*f*n-48*ln(c
*(e*x+d)^n)*a*b^2*d*e*f*n-24*x*ln(c*(e*x+d)^n)*a*b^2*d*e*g*n)/e^2

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 923 vs. \(2 (257) = 514\).

Time = 0.31 (sec) , antiderivative size = 923, normalized size of antiderivative = 3.48 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\frac {4 \, {\left (b^{3} e^{2} g n^{3} x^{2} + 2 \, b^{3} e^{2} f n^{3} x + {\left (2 \, b^{3} d e f - b^{3} d^{2} g\right )} n^{3}\right )} \log \left (e x + d\right )^{3} + 4 \, {\left (b^{3} e^{2} g x^{2} + 2 \, b^{3} e^{2} f x\right )} \log \left (c\right )^{3} - {\left (3 \, b^{3} e^{2} g n^{3} - 6 \, a b^{2} e^{2} g n^{2} + 6 \, a^{2} b e^{2} g n - 4 \, a^{3} e^{2} g\right )} x^{2} - 6 \, {\left ({\left (4 \, b^{3} d e f - 3 \, b^{3} d^{2} g\right )} n^{3} - 2 \, {\left (2 \, a b^{2} d e f - a b^{2} d^{2} g\right )} n^{2} + {\left (b^{3} e^{2} g n^{3} - 2 \, a b^{2} e^{2} g n^{2}\right )} x^{2} - 2 \, {\left (2 \, a b^{2} e^{2} f n^{2} - {\left (2 \, b^{3} e^{2} f - b^{3} d e g\right )} n^{3}\right )} x - 2 \, {\left (b^{3} e^{2} g n^{2} x^{2} + 2 \, b^{3} e^{2} f n^{2} x + {\left (2 \, b^{3} d e f - b^{3} d^{2} g\right )} n^{2}\right )} \log \left (c\right )\right )} \log \left (e x + d\right )^{2} - 6 \, {\left ({\left (b^{3} e^{2} g n - 2 \, a b^{2} e^{2} g\right )} x^{2} - 2 \, {\left (2 \, a b^{2} e^{2} f - {\left (2 \, b^{3} e^{2} f - b^{3} d e g\right )} n\right )} x\right )} \log \left (c\right )^{2} + 2 \, {\left (4 \, a^{3} e^{2} f - 3 \, {\left (8 \, b^{3} e^{2} f - 7 \, b^{3} d e g\right )} n^{3} + 6 \, {\left (4 \, a b^{2} e^{2} f - 3 \, a b^{2} d e g\right )} n^{2} - 6 \, {\left (2 \, a^{2} b e^{2} f - a^{2} b d e g\right )} n\right )} x + 6 \, {\left ({\left (8 \, b^{3} d e f - 7 \, b^{3} d^{2} g\right )} n^{3} - 2 \, {\left (4 \, a b^{2} d e f - 3 \, a b^{2} d^{2} g\right )} n^{2} + {\left (b^{3} e^{2} g n^{3} - 2 \, a b^{2} e^{2} g n^{2} + 2 \, a^{2} b e^{2} g n\right )} x^{2} + 2 \, {\left (b^{3} e^{2} g n x^{2} + 2 \, b^{3} e^{2} f n x + {\left (2 \, b^{3} d e f - b^{3} d^{2} g\right )} n\right )} \log \left (c\right )^{2} + 2 \, {\left (2 \, a^{2} b d e f - a^{2} b d^{2} g\right )} n + 2 \, {\left (2 \, a^{2} b e^{2} f n + {\left (4 \, b^{3} e^{2} f - 3 \, b^{3} d e g\right )} n^{3} - 2 \, {\left (2 \, a b^{2} e^{2} f - a b^{2} d e g\right )} n^{2}\right )} x - 2 \, {\left ({\left (4 \, b^{3} d e f - 3 \, b^{3} d^{2} g\right )} n^{2} + {\left (b^{3} e^{2} g n^{2} - 2 \, a b^{2} e^{2} g n\right )} x^{2} - 2 \, {\left (2 \, a b^{2} d e f - a b^{2} d^{2} g\right )} n - 2 \, {\left (2 \, a b^{2} e^{2} f n - {\left (2 \, b^{3} e^{2} f - b^{3} d e g\right )} n^{2}\right )} x\right )} \log \left (c\right )\right )} \log \left (e x + d\right ) + 6 \, {\left ({\left (b^{3} e^{2} g n^{2} - 2 \, a b^{2} e^{2} g n + 2 \, a^{2} b e^{2} g\right )} x^{2} + 2 \, {\left (2 \, a^{2} b e^{2} f + {\left (4 \, b^{3} e^{2} f - 3 \, b^{3} d e g\right )} n^{2} - 2 \, {\left (2 \, a b^{2} e^{2} f - a b^{2} d e g\right )} n\right )} x\right )} \log \left (c\right )}{8 \, e^{2}} \]

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^3,x, algorithm="fricas")

[Out]

1/8*(4*(b^3*e^2*g*n^3*x^2 + 2*b^3*e^2*f*n^3*x + (2*b^3*d*e*f - b^3*d^2*g)*n^3)*log(e*x + d)^3 + 4*(b^3*e^2*g*x
^2 + 2*b^3*e^2*f*x)*log(c)^3 - (3*b^3*e^2*g*n^3 - 6*a*b^2*e^2*g*n^2 + 6*a^2*b*e^2*g*n - 4*a^3*e^2*g)*x^2 - 6*(
(4*b^3*d*e*f - 3*b^3*d^2*g)*n^3 - 2*(2*a*b^2*d*e*f - a*b^2*d^2*g)*n^2 + (b^3*e^2*g*n^3 - 2*a*b^2*e^2*g*n^2)*x^
2 - 2*(2*a*b^2*e^2*f*n^2 - (2*b^3*e^2*f - b^3*d*e*g)*n^3)*x - 2*(b^3*e^2*g*n^2*x^2 + 2*b^3*e^2*f*n^2*x + (2*b^
3*d*e*f - b^3*d^2*g)*n^2)*log(c))*log(e*x + d)^2 - 6*((b^3*e^2*g*n - 2*a*b^2*e^2*g)*x^2 - 2*(2*a*b^2*e^2*f - (
2*b^3*e^2*f - b^3*d*e*g)*n)*x)*log(c)^2 + 2*(4*a^3*e^2*f - 3*(8*b^3*e^2*f - 7*b^3*d*e*g)*n^3 + 6*(4*a*b^2*e^2*
f - 3*a*b^2*d*e*g)*n^2 - 6*(2*a^2*b*e^2*f - a^2*b*d*e*g)*n)*x + 6*((8*b^3*d*e*f - 7*b^3*d^2*g)*n^3 - 2*(4*a*b^
2*d*e*f - 3*a*b^2*d^2*g)*n^2 + (b^3*e^2*g*n^3 - 2*a*b^2*e^2*g*n^2 + 2*a^2*b*e^2*g*n)*x^2 + 2*(b^3*e^2*g*n*x^2
+ 2*b^3*e^2*f*n*x + (2*b^3*d*e*f - b^3*d^2*g)*n)*log(c)^2 + 2*(2*a^2*b*d*e*f - a^2*b*d^2*g)*n + 2*(2*a^2*b*e^2
*f*n + (4*b^3*e^2*f - 3*b^3*d*e*g)*n^3 - 2*(2*a*b^2*e^2*f - a*b^2*d*e*g)*n^2)*x - 2*((4*b^3*d*e*f - 3*b^3*d^2*
g)*n^2 + (b^3*e^2*g*n^2 - 2*a*b^2*e^2*g*n)*x^2 - 2*(2*a*b^2*d*e*f - a*b^2*d^2*g)*n - 2*(2*a*b^2*e^2*f*n - (2*b
^3*e^2*f - b^3*d*e*g)*n^2)*x)*log(c))*log(e*x + d) + 6*((b^3*e^2*g*n^2 - 2*a*b^2*e^2*g*n + 2*a^2*b*e^2*g)*x^2
+ 2*(2*a^2*b*e^2*f + (4*b^3*e^2*f - 3*b^3*d*e*g)*n^2 - 2*(2*a*b^2*e^2*f - a*b^2*d*e*g)*n)*x)*log(c))/e^2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 836 vs. \(2 (258) = 516\).

Time = 1.27 (sec) , antiderivative size = 836, normalized size of antiderivative = 3.15 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\begin {cases} a^{3} f x + \frac {a^{3} g x^{2}}{2} - \frac {3 a^{2} b d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} + \frac {3 a^{2} b d f \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {3 a^{2} b d g n x}{2 e} - 3 a^{2} b f n x + 3 a^{2} b f x \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {3 a^{2} b g n x^{2}}{4} + \frac {3 a^{2} b g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {9 a b^{2} d^{2} g n \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} - \frac {3 a b^{2} d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2 e^{2}} - \frac {6 a b^{2} d f n \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {3 a b^{2} d f \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{e} - \frac {9 a b^{2} d g n^{2} x}{2 e} + \frac {3 a b^{2} d g n x \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + 6 a b^{2} f n^{2} x - 6 a b^{2} f n x \log {\left (c \left (d + e x\right )^{n} \right )} + 3 a b^{2} f x \log {\left (c \left (d + e x\right )^{n} \right )}^{2} + \frac {3 a b^{2} g n^{2} x^{2}}{4} - \frac {3 a b^{2} g n x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {3 a b^{2} g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2} - \frac {21 b^{3} d^{2} g n^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{4 e^{2}} + \frac {9 b^{3} d^{2} g n \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{4 e^{2}} - \frac {b^{3} d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}^{3}}{2 e^{2}} + \frac {6 b^{3} d f n^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {3 b^{3} d f n \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{e} + \frac {b^{3} d f \log {\left (c \left (d + e x\right )^{n} \right )}^{3}}{e} + \frac {21 b^{3} d g n^{3} x}{4 e} - \frac {9 b^{3} d g n^{2} x \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e} + \frac {3 b^{3} d g n x \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2 e} - 6 b^{3} f n^{3} x + 6 b^{3} f n^{2} x \log {\left (c \left (d + e x\right )^{n} \right )} - 3 b^{3} f n x \log {\left (c \left (d + e x\right )^{n} \right )}^{2} + b^{3} f x \log {\left (c \left (d + e x\right )^{n} \right )}^{3} - \frac {3 b^{3} g n^{3} x^{2}}{8} + \frac {3 b^{3} g n^{2} x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{4} - \frac {3 b^{3} g n x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{4} + \frac {b^{3} g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}^{3}}{2} & \text {for}\: e \neq 0 \\\left (a + b \log {\left (c d^{n} \right )}\right )^{3} \left (f x + \frac {g x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((g*x+f)*(a+b*ln(c*(e*x+d)**n))**3,x)

[Out]

Piecewise((a**3*f*x + a**3*g*x**2/2 - 3*a**2*b*d**2*g*log(c*(d + e*x)**n)/(2*e**2) + 3*a**2*b*d*f*log(c*(d + e
*x)**n)/e + 3*a**2*b*d*g*n*x/(2*e) - 3*a**2*b*f*n*x + 3*a**2*b*f*x*log(c*(d + e*x)**n) - 3*a**2*b*g*n*x**2/4 +
 3*a**2*b*g*x**2*log(c*(d + e*x)**n)/2 + 9*a*b**2*d**2*g*n*log(c*(d + e*x)**n)/(2*e**2) - 3*a*b**2*d**2*g*log(
c*(d + e*x)**n)**2/(2*e**2) - 6*a*b**2*d*f*n*log(c*(d + e*x)**n)/e + 3*a*b**2*d*f*log(c*(d + e*x)**n)**2/e - 9
*a*b**2*d*g*n**2*x/(2*e) + 3*a*b**2*d*g*n*x*log(c*(d + e*x)**n)/e + 6*a*b**2*f*n**2*x - 6*a*b**2*f*n*x*log(c*(
d + e*x)**n) + 3*a*b**2*f*x*log(c*(d + e*x)**n)**2 + 3*a*b**2*g*n**2*x**2/4 - 3*a*b**2*g*n*x**2*log(c*(d + e*x
)**n)/2 + 3*a*b**2*g*x**2*log(c*(d + e*x)**n)**2/2 - 21*b**3*d**2*g*n**2*log(c*(d + e*x)**n)/(4*e**2) + 9*b**3
*d**2*g*n*log(c*(d + e*x)**n)**2/(4*e**2) - b**3*d**2*g*log(c*(d + e*x)**n)**3/(2*e**2) + 6*b**3*d*f*n**2*log(
c*(d + e*x)**n)/e - 3*b**3*d*f*n*log(c*(d + e*x)**n)**2/e + b**3*d*f*log(c*(d + e*x)**n)**3/e + 21*b**3*d*g*n*
*3*x/(4*e) - 9*b**3*d*g*n**2*x*log(c*(d + e*x)**n)/(2*e) + 3*b**3*d*g*n*x*log(c*(d + e*x)**n)**2/(2*e) - 6*b**
3*f*n**3*x + 6*b**3*f*n**2*x*log(c*(d + e*x)**n) - 3*b**3*f*n*x*log(c*(d + e*x)**n)**2 + b**3*f*x*log(c*(d + e
*x)**n)**3 - 3*b**3*g*n**3*x**2/8 + 3*b**3*g*n**2*x**2*log(c*(d + e*x)**n)/4 - 3*b**3*g*n*x**2*log(c*(d + e*x)
**n)**2/4 + b**3*g*x**2*log(c*(d + e*x)**n)**3/2, Ne(e, 0)), ((a + b*log(c*d**n))**3*(f*x + g*x**2/2), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 662 vs. \(2 (257) = 514\).

Time = 0.22 (sec) , antiderivative size = 662, normalized size of antiderivative = 2.50 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\frac {1}{2} \, b^{3} g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{3} + \frac {3}{2} \, a b^{2} g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + b^{3} f x \log \left ({\left (e x + d\right )}^{n} c\right )^{3} - 3 \, a^{2} b e f n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} - \frac {3}{4} \, a^{2} b e g n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac {3}{2} \, a^{2} b g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + 3 \, a b^{2} f x \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + \frac {1}{2} \, a^{3} g x^{2} + 3 \, a^{2} b f x \log \left ({\left (e x + d\right )}^{n} c\right ) - 3 \, {\left (2 \, e n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {{\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n^{2}}{e}\right )} a b^{2} f - {\left (3 \, e n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} - e n {\left (\frac {{\left (d \log \left (e x + d\right )^{3} + 3 \, d \log \left (e x + d\right )^{2} - 6 \, e x + 6 \, d \log \left (e x + d\right )\right )} n^{2}}{e^{2}} - \frac {3 \, {\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n \log \left ({\left (e x + d\right )}^{n} c\right )}{e^{2}}\right )}\right )} b^{3} f - \frac {3}{4} \, {\left (2 \, e n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) - \frac {{\left (e^{2} x^{2} + 2 \, d^{2} \log \left (e x + d\right )^{2} - 6 \, d e x + 6 \, d^{2} \log \left (e x + d\right )\right )} n^{2}}{e^{2}}\right )} a b^{2} g - \frac {1}{8} \, {\left (6 \, e n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + e n {\left (\frac {{\left (4 \, d^{2} \log \left (e x + d\right )^{3} + 3 \, e^{2} x^{2} + 18 \, d^{2} \log \left (e x + d\right )^{2} - 42 \, d e x + 42 \, d^{2} \log \left (e x + d\right )\right )} n^{2}}{e^{3}} - \frac {6 \, {\left (e^{2} x^{2} + 2 \, d^{2} \log \left (e x + d\right )^{2} - 6 \, d e x + 6 \, d^{2} \log \left (e x + d\right )\right )} n \log \left ({\left (e x + d\right )}^{n} c\right )}{e^{3}}\right )}\right )} b^{3} g + a^{3} f x \]

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^3,x, algorithm="maxima")

[Out]

1/2*b^3*g*x^2*log((e*x + d)^n*c)^3 + 3/2*a*b^2*g*x^2*log((e*x + d)^n*c)^2 + b^3*f*x*log((e*x + d)^n*c)^3 - 3*a
^2*b*e*f*n*(x/e - d*log(e*x + d)/e^2) - 3/4*a^2*b*e*g*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) + 3/2*a
^2*b*g*x^2*log((e*x + d)^n*c) + 3*a*b^2*f*x*log((e*x + d)^n*c)^2 + 1/2*a^3*g*x^2 + 3*a^2*b*f*x*log((e*x + d)^n
*c) - 3*(2*e*n*(x/e - d*log(e*x + d)/e^2)*log((e*x + d)^n*c) + (d*log(e*x + d)^2 - 2*e*x + 2*d*log(e*x + d))*n
^2/e)*a*b^2*f - (3*e*n*(x/e - d*log(e*x + d)/e^2)*log((e*x + d)^n*c)^2 - e*n*((d*log(e*x + d)^3 + 3*d*log(e*x
+ d)^2 - 6*e*x + 6*d*log(e*x + d))*n^2/e^2 - 3*(d*log(e*x + d)^2 - 2*e*x + 2*d*log(e*x + d))*n*log((e*x + d)^n
*c)/e^2))*b^3*f - 3/4*(2*e*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2)*log((e*x + d)^n*c) - (e^2*x^2 + 2*
d^2*log(e*x + d)^2 - 6*d*e*x + 6*d^2*log(e*x + d))*n^2/e^2)*a*b^2*g - 1/8*(6*e*n*(2*d^2*log(e*x + d)/e^3 + (e*
x^2 - 2*d*x)/e^2)*log((e*x + d)^n*c)^2 + e*n*((4*d^2*log(e*x + d)^3 + 3*e^2*x^2 + 18*d^2*log(e*x + d)^2 - 42*d
*e*x + 42*d^2*log(e*x + d))*n^2/e^3 - 6*(e^2*x^2 + 2*d^2*log(e*x + d)^2 - 6*d*e*x + 6*d^2*log(e*x + d))*n*log(
(e*x + d)^n*c)/e^3))*b^3*g + a^3*f*x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1321 vs. \(2 (257) = 514\).

Time = 0.33 (sec) , antiderivative size = 1321, normalized size of antiderivative = 4.98 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx=\text {Too large to display} \]

[In]

integrate((g*x+f)*(a+b*log(c*(e*x+d)^n))^3,x, algorithm="giac")

[Out]

(e*x + d)*b^3*f*n^3*log(e*x + d)^3/e + 1/2*(e*x + d)^2*b^3*g*n^3*log(e*x + d)^3/e^2 - (e*x + d)*b^3*d*g*n^3*lo
g(e*x + d)^3/e^2 - 3*(e*x + d)*b^3*f*n^3*log(e*x + d)^2/e - 3/4*(e*x + d)^2*b^3*g*n^3*log(e*x + d)^2/e^2 + 3*(
e*x + d)*b^3*d*g*n^3*log(e*x + d)^2/e^2 + 3*(e*x + d)*b^3*f*n^2*log(e*x + d)^2*log(c)/e + 3/2*(e*x + d)^2*b^3*
g*n^2*log(e*x + d)^2*log(c)/e^2 - 3*(e*x + d)*b^3*d*g*n^2*log(e*x + d)^2*log(c)/e^2 + 6*(e*x + d)*b^3*f*n^3*lo
g(e*x + d)/e + 3/4*(e*x + d)^2*b^3*g*n^3*log(e*x + d)/e^2 - 6*(e*x + d)*b^3*d*g*n^3*log(e*x + d)/e^2 + 3*(e*x
+ d)*a*b^2*f*n^2*log(e*x + d)^2/e + 3/2*(e*x + d)^2*a*b^2*g*n^2*log(e*x + d)^2/e^2 - 3*(e*x + d)*a*b^2*d*g*n^2
*log(e*x + d)^2/e^2 - 6*(e*x + d)*b^3*f*n^2*log(e*x + d)*log(c)/e - 3/2*(e*x + d)^2*b^3*g*n^2*log(e*x + d)*log
(c)/e^2 + 6*(e*x + d)*b^3*d*g*n^2*log(e*x + d)*log(c)/e^2 + 3*(e*x + d)*b^3*f*n*log(e*x + d)*log(c)^2/e + 3/2*
(e*x + d)^2*b^3*g*n*log(e*x + d)*log(c)^2/e^2 - 3*(e*x + d)*b^3*d*g*n*log(e*x + d)*log(c)^2/e^2 - 6*(e*x + d)*
b^3*f*n^3/e - 3/8*(e*x + d)^2*b^3*g*n^3/e^2 + 6*(e*x + d)*b^3*d*g*n^3/e^2 - 6*(e*x + d)*a*b^2*f*n^2*log(e*x +
d)/e - 3/2*(e*x + d)^2*a*b^2*g*n^2*log(e*x + d)/e^2 + 6*(e*x + d)*a*b^2*d*g*n^2*log(e*x + d)/e^2 + 6*(e*x + d)
*b^3*f*n^2*log(c)/e + 3/4*(e*x + d)^2*b^3*g*n^2*log(c)/e^2 - 6*(e*x + d)*b^3*d*g*n^2*log(c)/e^2 + 6*(e*x + d)*
a*b^2*f*n*log(e*x + d)*log(c)/e + 3*(e*x + d)^2*a*b^2*g*n*log(e*x + d)*log(c)/e^2 - 6*(e*x + d)*a*b^2*d*g*n*lo
g(e*x + d)*log(c)/e^2 - 3*(e*x + d)*b^3*f*n*log(c)^2/e - 3/4*(e*x + d)^2*b^3*g*n*log(c)^2/e^2 + 3*(e*x + d)*b^
3*d*g*n*log(c)^2/e^2 + (e*x + d)*b^3*f*log(c)^3/e + 1/2*(e*x + d)^2*b^3*g*log(c)^3/e^2 - (e*x + d)*b^3*d*g*log
(c)^3/e^2 + 6*(e*x + d)*a*b^2*f*n^2/e + 3/4*(e*x + d)^2*a*b^2*g*n^2/e^2 - 6*(e*x + d)*a*b^2*d*g*n^2/e^2 + 3*(e
*x + d)*a^2*b*f*n*log(e*x + d)/e + 3/2*(e*x + d)^2*a^2*b*g*n*log(e*x + d)/e^2 - 3*(e*x + d)*a^2*b*d*g*n*log(e*
x + d)/e^2 - 6*(e*x + d)*a*b^2*f*n*log(c)/e - 3/2*(e*x + d)^2*a*b^2*g*n*log(c)/e^2 + 6*(e*x + d)*a*b^2*d*g*n*l
og(c)/e^2 + 3*(e*x + d)*a*b^2*f*log(c)^2/e + 3/2*(e*x + d)^2*a*b^2*g*log(c)^2/e^2 - 3*(e*x + d)*a*b^2*d*g*log(
c)^2/e^2 - 3*(e*x + d)*a^2*b*f*n/e - 3/4*(e*x + d)^2*a^2*b*g*n/e^2 + 3*(e*x + d)*a^2*b*d*g*n/e^2 + 3*(e*x + d)
*a^2*b*f*log(c)/e + 3/2*(e*x + d)^2*a^2*b*g*log(c)/e^2 - 3*(e*x + d)*a^2*b*d*g*log(c)/e^2 + (e*x + d)*a^3*f/e
+ 1/2*(e*x + d)^2*a^3*g/e^2 - (e*x + d)*a^3*d*g/e^2

Mupad [B] (verification not implemented)

Time = 1.65 (sec) , antiderivative size = 511, normalized size of antiderivative = 1.93 \[ \int (f+g x) \left (a+b \log \left (c (d+e x)^n\right )\right )^3 \, dx={\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^3\,\left (\frac {b^3\,g\,x^2}{2}-\frac {d\,\left (b^3\,d\,g-2\,b^3\,e\,f\right )}{2\,e^2}+b^3\,f\,x\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (\frac {x\,\left (\frac {12\,a^2\,b\,d\,g+12\,a^2\,b\,e\,f-12\,b^3\,d\,g\,n^2+24\,b^3\,e\,f\,n^2-24\,a\,b^2\,e\,f\,n}{2\,e}-\frac {3\,b\,d\,g\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{e}\right )}{2}+\frac {3\,b\,g\,x^2\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{4}\right )+{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (\frac {x\,\left (\frac {6\,b^2\,\left (a\,d\,g+a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {3\,b^2\,d\,g\,\left (2\,a-b\,n\right )}{e}\right )}{2}-\frac {3\,d\,\left (2\,a\,b^2\,d\,g-4\,a\,b^2\,e\,f-3\,b^3\,d\,g\,n+4\,b^3\,e\,f\,n\right )}{4\,e^2}+\frac {3\,b^2\,g\,x^2\,\left (2\,a-b\,n\right )}{4}\right )+x\,\left (\frac {4\,a^3\,d\,g+4\,a^3\,e\,f+18\,b^3\,d\,g\,n^3-24\,b^3\,e\,f\,n^3-12\,a\,b^2\,d\,g\,n^2+24\,a\,b^2\,e\,f\,n^2-12\,a^2\,b\,e\,f\,n}{4\,e}-\frac {d\,g\,\left (4\,a^3-6\,a^2\,b\,n+6\,a\,b^2\,n^2-3\,b^3\,n^3\right )}{4\,e}\right )+\frac {g\,x^2\,\left (4\,a^3-6\,a^2\,b\,n+6\,a\,b^2\,n^2-3\,b^3\,n^3\right )}{8}-\frac {\ln \left (d+e\,x\right )\,\left (6\,g\,a^2\,b\,d^2\,n-12\,e\,f\,a^2\,b\,d\,n-18\,g\,a\,b^2\,d^2\,n^2+24\,e\,f\,a\,b^2\,d\,n^2+21\,g\,b^3\,d^2\,n^3-24\,e\,f\,b^3\,d\,n^3\right )}{4\,e^2} \]

[In]

int((f + g*x)*(a + b*log(c*(d + e*x)^n))^3,x)

[Out]

log(c*(d + e*x)^n)^3*((b^3*g*x^2)/2 - (d*(b^3*d*g - 2*b^3*e*f))/(2*e^2) + b^3*f*x) + log(c*(d + e*x)^n)*((x*((
12*a^2*b*d*g + 12*a^2*b*e*f - 12*b^3*d*g*n^2 + 24*b^3*e*f*n^2 - 24*a*b^2*e*f*n)/(2*e) - (3*b*d*g*(2*a^2 + b^2*
n^2 - 2*a*b*n))/e))/2 + (3*b*g*x^2*(2*a^2 + b^2*n^2 - 2*a*b*n))/4) + log(c*(d + e*x)^n)^2*((x*((6*b^2*(a*d*g +
 a*e*f - b*e*f*n))/e - (3*b^2*d*g*(2*a - b*n))/e))/2 - (3*d*(2*a*b^2*d*g - 4*a*b^2*e*f - 3*b^3*d*g*n + 4*b^3*e
*f*n))/(4*e^2) + (3*b^2*g*x^2*(2*a - b*n))/4) + x*((4*a^3*d*g + 4*a^3*e*f + 18*b^3*d*g*n^3 - 24*b^3*e*f*n^3 -
12*a*b^2*d*g*n^2 + 24*a*b^2*e*f*n^2 - 12*a^2*b*e*f*n)/(4*e) - (d*g*(4*a^3 - 3*b^3*n^3 + 6*a*b^2*n^2 - 6*a^2*b*
n))/(4*e)) + (g*x^2*(4*a^3 - 3*b^3*n^3 + 6*a*b^2*n^2 - 6*a^2*b*n))/8 - (log(d + e*x)*(21*b^3*d^2*g*n^3 + 6*a^2
*b*d^2*g*n - 24*b^3*d*e*f*n^3 - 18*a*b^2*d^2*g*n^2 - 12*a^2*b*d*e*f*n + 24*a*b^2*d*e*f*n^2))/(4*e^2)